export default {
  methods: {
    /**
     * 订单支付
     */
    async payOrder(order_id) {
      let params = {
        payway: 'wxpay',
        order_id,
      }
      const res = await this.$api.common.order('payOrder', params)
      if (res.code === 0) {
        const { pay_info, order_info } = res.data
        if (this.$wechat && this.$wechat.isWechat()) {
          this.$wechat.startPay(pay_info)
        }
      }
    },
  },
}
